import request from "@/utils/request.js";

/**
 * 保存题目
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const saveQuestions = (data) => {
  return request.post('/user/question', data)
}

/**
 * 根据应用id查询题目
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const queryQuestionsByAppId = (data) => {
  return request.get('/user/question/' + data)
}

/**
 * 查询题目列表
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const queryQuestionsList = (data) => {
  return request.get('/user/question/safe/' + data)
}

/**
 * 保存生成题目
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const saveGenerateQuestionByAppId = (data) => {
  return request.post('/user/question/save', data)
}
